<template>
	<view>
		<view class="mainpadding" style="background-color: #fea23d;align-items: flex-start;">
			<view class="flexright smalltext xiaobai" style=""  @click="jumpurl('/pages/tuanzhang/shouyimx')">{{$t('shouyi.symx')}}></view>
			<view class="flexcolumn">
				<view class="sanshier xiaobai bold" style="font-size: 40rpx;">{{dataAll.cumulativeIncome}}</view>
				<view class="ershiba xiaobai margin_top">{{$t('shouyi.ljsy')}}</view>
			</view>
		</view>
		<view class="mainpadding_top ffffff flexbetween">
			<view class="ershiba xiaohei">{{$t('shouyi.ktxsy')}}</view>
			<view class="ershiba xiaohuang">{{dataAll.isWithdrawal}}{{$t('dingdanmx.y')}}</view>
		</view>
		<view class="mainpadding_top ffffff ">
			<view class="flexbetween">
				<view class="ershiba xiaohei">{{$t('shouyi.ysqsy')}}</view>
				<view class="ershiba xiaohei">{{dataAll.appForIncome}}{{$t('dingdanmx.y')}}</view>
			</view>
			<view class="flexbetween margin_top5">
				<view class="ershiba xiaohei">{{$t('shouyi.ddksy')}}</view>
				<view class="ershiba xiaohei">{{dataAll.isNoPaymentIncome}}{{$t('dingdanmx.y')}}</view>
			</view>
			<view class="flexbetween margin_top5">
				<view class="ershiba xiaohei">{{$t('shouyi.wxsy')}}</view>
				<view class="ershiba xiaohei">{{dataAll.invalidIncome}}{{$t('dingdanmx.y')}}</view>
			</view>
			<view class="flexbetween margin_top5">
				<view class="ershiba xiaohei">{{$t('shouyi.cgtxsy')}}</view>
				<view class="ershiba xiaohei">{{dataAll.successWithdrawalIncome}}{{$t('dingdanmx.y')}}</view>
			</view>
		</view>
		<view class="mainpadding_top ffffff ">
			<view class="flexbetween">
				<view class="ershiba xiaohei">{{$t('shouyi.dshsy')}}</view>
				<view class="ershiba xiaohei">{{dataAll.toBeReceivedIncome}}{{$t('dingdanmx.y')}}</view>
			</view>
			<view class="flexbetween margin_top5">
				<view class="ershiba xiaohei">{{$t('shouyi.wjssy')}}</view>
				<view class="ershiba xiaohei">{{dataAll.unsettledIncome}}{{$t('dingdanmx.y')}}</view>
			</view>
		</view>
		<view class="gudingdb mainpadding_top">
			<view class="bigbtn" style="background-color: #fea23d;" @click="show=true">{{$t('shouyi.wytx')}}</view>
		</view>
		<!-- 提现弹框 -->
		<u-modal :show="show" :title="$t('shouyi.tx')" :confirmText="$t('shouyi.qr')" @confirm="chongzhi" :cancelText="$t('shouyi.qx')" @cancel="show=false"
			showCancelButton>
			<view class="slot-content mainpadding" style="width: 600rpx;">
				<view class="flexbetween  margin_top">
					<view class="main_size bold hei_text">{{$t('shouyi.txje')}}：</view>
					<input type="number" class="textright" :placeholder="$t('shouyi.qsrtxje')" v-model="price">
				</view>
				<view class="margin_top">
					<view class=" xiaohong smalltext">1.{{dataAll.notice}}</view>
					<view class=" xiaohong smalltext margin_top1">2.{{$t('shouyi.zgtx')}}</view>
				</view>
			</view>
		</u-modal>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				show:false,
				dataAll:{},
				price:""
			}
		},
		onLoad() {
			this.getinfo()
		},
		methods: {
			getinfo(){
				httpRequest.request('/wx/spreader/spreaderRevenueDetails', 'GET', {
				}).then(res => {
					this.dataAll = res.data
				})
			},
			// 提现
			chongzhi(){
				if(this.price==""){
					httpRequest.toast($t('shouyi.qsrtxje'))
					return false
				}
				httpRequest.request('/wx/spreader/spreaderMoney', 'GET', {
					money:this.price
				}).then(res => {
					this.show = false
					this.price = ""
					httpRequest.toast(res.errmsg)
				})
			},
		}
	}
</script>

<style>

</style>
